using System;
using System.Data;
using System.Collections;
//using PCS's namespaces
using PCSComUtils.PCSExc;
using PCSComProduction.ScrapRecording.DS;


namespace PCSComProduction.ScrapRecording.BO
{
	/// <summary>
	/// Summary description for OperationScrapBO.
	/// </summary>
	//[Transaction(TransactionOption.Required)]
	public class AOScrapCostBO //:  IAOScrapCostBO
	{
		public AOScrapCostBO()
		{			
		}

		#region IObjectBO Members
		//[AutoComplete(true)]	
		public void GetAOScrapCost(int pintProductID, int pintCCNID)
		{

		}
		
		//[AutoComplete(true)]	
		public object GetAOScrapCost(int pintAOScrapID)
		{
			try
			{				
				return (new PRO_AOScrapCostDS()).GetObjectVO(pintAOScrapID);
			}
			catch (PCSDBException ex)
			{
				throw ex;
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}

		//[AutoComplete(true)]
		public void UpdateDataSet(DataSet dstData)
		{
			try
			{
				PRO_AOScrapCostDS dsScrapCost = new PRO_AOScrapCostDS();
				dsScrapCost.UpdateDataSet(dstData);
			}
			catch (PCSDBException ex)
			{
				throw ex;
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}

		//[AutoComplete(true)]
		public void Update(object pobjScrapCost)
		{
			try
			{
				PRO_AOScrapCostDS dsScrapCost = new PRO_AOScrapCostDS();
				dsScrapCost.Update(pobjScrapCost);
			}
			catch (PCSDBException ex)
			{
				throw ex;
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}

		//[AutoComplete(true)]
		public void Delete(object pobjScrapCosts)
		{
			try
			{
				PRO_AOScrapCostDS dsScrapCost = new PRO_AOScrapCostDS();
				dsScrapCost.Delete(((PRO_AOScrapCostVO)pobjScrapCosts).AOScrapCostID);
			}
			catch (PCSDBException ex)
			{
				throw ex;
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}

		//[AutoComplete(true)]
		public void Delete(Hashtable htbMaterIDs)
		{
			try
			{
				PRO_AOScrapCostDS dsScrapCost = new PRO_AOScrapCostDS();
				dsScrapCost.Delete(htbMaterIDs);
			}
			catch (PCSDBException ex)
			{
				throw ex;
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}

		//[AutoComplete(true)]
		public void Add(object pobjScrapCost)
		{
			try
			{
				PRO_AOScrapCostDS dsScrapCost = new PRO_AOScrapCostDS();
				dsScrapCost.Add(pobjScrapCost);
			}
			catch (PCSDBException ex)
			{
				throw ex;
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}

		//[AutoComplete(true)]
		public object GetObjectVO(int pintID, string pstrClassName)
		{
			return null;
		}

		//[AutoComplete(true)]
		public object GetObjectVO(int pintID)
		{
			try
			{
				PRO_AOScrapCostDS dsScrapCost = new PRO_AOScrapCostDS();
				return dsScrapCost.GetObjectVO(pintID);
			}
			catch (PCSDBException ex)
			{
				throw ex;
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}			
		}

		#endregion
	}
}
